using System;
using System.Collections.Generic;
using System.Text;

namespace Objects
{
   public class DanhSachChoDuyet
    {
        #region DangKy variables

       // id cho duyet
        private int _Id;

       private String _TenKhachHang;
        private DateTime _NgayDangKy;

       private String _MenhGia;
     
       private String _MauThe;

      // private int _TrangThaiDuyet;
       
        #endregion

        #region DangKy properties

        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        public DateTime NgayDangKy
        {
            get { return _NgayDangKy; }
            set { _NgayDangKy = value; }
        }

        public String MauThe
        {
            get { return _MauThe; }
            set { _MauThe = value; }
        }

        public String TenKhachHang
        {
            get { return _TenKhachHang; }
            set { _TenKhachHang = value; }
        }

       public String MenhGia
       {
           get { return _MenhGia; }
           set { _MenhGia = value; }
       }

       //public int TrangThaiDuyet
       //{
       //    get { return _TrangThaiDuyet; }
       //    set { _TrangThaiDuyet = value; }
       //}


        #endregion

        #region IPopulatable<DanhSachChoDuyet> Members

       public DanhSachChoDuyet Populate(System.Data.DataRow reader)
        {
            DanhSachChoDuyet item = new DanhSachChoDuyet();

            try { item.Id = Convert.ToInt32(reader["Id"].ToString()); }
            catch { item.Id = -1; }


            item.NgayDangKy = Convert.ToDateTime(reader["NgayDangKy"].ToString());

            item.TenKhachHang = Convert.ToString(reader["TenKhachHang"].ToString());

            item.MauThe = Convert.ToString(reader["MauThe"].ToString());
            item.MenhGia = Convert.ToString(reader["MenhGia"].ToString());
          //  item.TrangThaiDuyet = Convert.ToInt32(reader["TrangThaiDuyet"].ToString());

            return item;
        }

        #endregion
    }
}
